package com.socialuni.sdk.service;

import com.socialuni.sdk.user.phone.SocialBindPhoneNumDomain;
import com.socialuni.sdk.factory.user.base.SocialUserDetailROFactory;
import com.socialuni.sdk.model.BindPhoneVO;
import com.socialuni.sdk.model.DO.user.UserDO;
import com.socialuni.sdk.model.RO.SocialUserDetailRO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SocialPhoneNumService {
    @Resource
    SocialBindPhoneNumDomain socialBindPhoneNumDomain;

    public SocialUserDetailRO userBindPhoneNum(BindPhoneVO bindPhoneVO, UserDO mineUser) {
        mineUser = socialBindPhoneNumDomain.checkAuthCodeAndUserBindPhoneNum(bindPhoneVO, mineUser);
        //根据用户得到返回详情
        SocialUserDetailRO socialUserDetailRO = SocialUserDetailROFactory.getMineUserDetail(mineUser);
        return socialUserDetailRO;
    }
}
